<!DOCTYPE html>
<html>
<head>
    <title>添加</title>
    <script src="/static/js/jquery-2.1.1.js"></script>
    <script src="/static/bootstrap/js/bootstrap.js"></script>
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
    <!--引用layui弹框插件-->
    <script src="/static/layui/layui.all.js"></script>
    <script src="/static/layui/layui.js"></script>
    <link href="/static/layui/css/layui.css" rel="stylesheet"/>
    <script src="/static/layui/lay/modules/layer.js"></script>

</head>
<body>
<style>
    html, body{background-color:#FFF!important;}
    .modal-body{background-color:#fff;padding:15px;width: 100%}
    .layui-form-pane .layui-form-label{font-size:12px!important;}
    /*.modal-body{display: inline-block;padding-bottom:78px;}*/
</style>

<div class="modal-body">

    <form class="layui-form layui-form-pane form-horizontal" action="" >
        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">*月份</label>
            <div class="input-group col-xs-4">
                <input type="number" name="month" placeholder="月份" class="layui-input" value="{$detail.month}">
            </div>
        </div>

        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">*推进计划</label>
            <div class="input-group col-xs-4" style="float: left">
                <select name="advance_id" lay-search="">
                    <option value="">请选择类别</option>
                    {volist name="advance" id="vo"}
                    <option value="{$vo.id}" {if condition="$detail['advance_id'] eq $vo['id']"} selected {/if}>{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>

        <!--图文模型&单页模型-->
        <div class="layui-form-item" >
            <a class="layui-form-label" title="工作内容" href="javascript:;">*工作内容:</a>
            <div class="input-group col-xs-8">
                <textarea placeholder="请输入内容" class="layui-textarea" name="content">{$detail.content}</textarea>
                <!--<textarea id="content" ></textarea>-->
                <!--<textarea name="" id="hiddensupplyservice" ></textarea>-->
            </div>
        </div>

        <input type="hidden" name="plan_id" value="{$id}">
        <input type="hidden" name="id" value="{$detail.id}">
    </form>

</div>

<script>
    layui.extend({
        tinymce: '/static/tinymce/tinymce'
    });
    layui.use(['form','tinymce','laydate','transfer'], function() {
        var form = layui.form
            , layer = layui.layer;
        var tinymce = layui.tinymce;
        var transfer = layui.transfer;
        var laydate = layui.laydate;

        // tinymce.render({
        //     elem:'#content',
        //     height:400,
        //     images_upload_handler: function (blobInfo, succFun, failFun) {
        //         var xhr, formData;
        //         var file = blobInfo.blob();//转化为易于理解的file对象
        //         xhr = new XMLHttpRequest();
        //         xhr.withCredentials = false;
        //         xhr.open('POST', "{:URL('/common/upload/textUpload')}");
        //         xhr.onload = function() {
        //             var json;
        //             json = JSON.parse(xhr.responseText);
        //             succFun(json.path);
        //         };
        //         formData = new FormData();
        //         formData.append('file', file, file.name );//此处与源文档不一样
        //         xhr.send(formData);
        //     },
        //     setup:function(editor){
        //         editor.on('blur',function (){
        //             $("#hiddensupplyservice").html(tinyMCE.activeEditor.getContent());
        //         })
        //     }
        // },(opt, edit) => {});


    })
</script>


</body>
</html>